package com.power.ding.api;

import com.plf.common.domain.ResponseDTO;
import com.power.ding.model.Di_user;
import com.power.ding.model.Gzt_User;
import com.power.ding.model.pageInfo.Di_userPageInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 *  用户信息 Feign
 */
public interface IDi_userFeign {

    /**
     * 用户信息分页列表
     */
    @PostMapping("/di_user/list")
    ResponseDTO list(@RequestBody Di_userPageInfo di_userPageInfo);

    /**
    * 查看用户信息
    */
    @GetMapping("/di_user/view")
    ResponseDTO view(@RequestParam("id") String id);

    /**
    * 删除用户信息
    */
    @PostMapping("/di_user/delete")
    ResponseDTO delete(@RequestParam("id") String id);

    ///**
    // * 查看用户信息 复合主键使用
    // */
    //@PostMapping("/di_user/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Di_user.Di_userPK pk);

    /**
     * 修改或保存用户信息
     */
    @PostMapping("/di_user/save")
    ResponseDTO save(@RequestBody Di_user  di_user);

    ///**
    // * 删除用户信息 复合主键使用
    // */
    //@PostMapping("/di_user/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Di_user.Di_userPK pk);

    /**
     * 批量删除用户信息
     */
    @PostMapping("/di_user/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);

     /**
     * 导出excel
     */
    @PostMapping("/di_user/output")
    void output(HttpServletResponse response, @RequestBody Di_userPageInfo di_userPageInfo);

     /**
     * 导出excel模板
     */
    @PostMapping("/di_user/exportExcelTemplate")
    void exportExcelTemplate(HttpServletResponse response);

     /**
     *	导入excel
     */
    @PostMapping("/di_user/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException ;

    /**
     * 按照组织层级id查询对应的人员
     * @param
     * @return
     */
    @PostMapping("/di_user/findUserByOrgId")
    ResponseDTO findUserByOrgId(@RequestParam("orgId") String orgId);

    /**
     * 查询登录人和部门信息
     * @param
     * @return
     */
    @PostMapping("/di_user/getUserAndDeptById")
    ResponseDTO getUserAndDeptById(@RequestParam String userid, @RequestBody Gzt_User gzt_user);


    /**
     * 按照电话号码查询对应的赣政通用户
     * @param
     * @return
     */
    @PostMapping("/di_user/getUserByPhones")
    ResponseDTO getUserByPhones(@RequestBody List<String> phones);

    /**
     * 按照电话号码查询对应的系统用户
     * @param
     * @return
     */
    @PostMapping("/di_user/getSysUserByPhones")
    ResponseDTO getSysUserByPhones(@RequestParam String mobile);

    /**
     * 按照电话号码查询赣政通可登录用户
     * @param
     * @return
     */
    @PostMapping("/di_user/getRelUserByMobile")
    ResponseDTO getRelUserByMobile(@RequestParam String mobile);

    /**
     * 根据区划查询关联用户
     * @param adid
     * @return
     */
    @PostMapping("/di_user/getUserByAdid")
    ResponseDTO getUserByAdid(@RequestParam String adid);

    /**
     * 根据区划查询关联用户
     * @param deptid
     * @return
     */
    @PostMapping("/di_user/getUserByDeptid")
    ResponseDTO getUserByDeptid(@RequestParam String deptid);
}
